home *** CD-ROM | disk | FTP | other *** search
/ Network CD 1 / Network CD.iso / ncomm / scripts / count.script < prev    next >
Text File  |  1993-04-24  |  385b  |  22 lines

  1. ;NComm script that demonstrates three different ways to count from 1 to 100
  2.  
  3. SET $sum="0"
  4.  
  5. WHILE !$sum == "100" DO
  6.     SET $sum = $sum+"1"#
  7.     MESSAGE "While: "$sum"\n"
  8. ENDWHILE
  9.  
  10. SET $sum="0"
  11.  
  12. REPEAT
  13.     SET $sum = $sum+"1"#
  14.     MESSAGE "Repeat: "$sum"\n"
  15. UNTIL $sum == "100"
  16.  
  17. SET $sum="0"
  18.  
  19. SUM: SET $sum = $sum+"1"#
  20.      MESSAGE "Goto: "$sum"\n"
  21.      IF !$sum == "100" THEN GOTO SUM
  22.